package org.krishna.model;



import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "login_details")
public class Login implements Serializable{
	
	/** The Constant serialVersionUID. */
	@Transient
	private static final long serialVersionUID = -7660824605183781430L;
	
	public Login() {

	}

	public Login(String userName, String password, String type) {
		this.userName = userName;
		this.password = password;
		this.type = type;
		
	}

	@Id
	@GeneratedValue
	@Column(name = "login_id")
	private long loginId;

	@Column(name = "user_name")
	private String userName;

	@Column(name = "password")
	private String password;
	
	@Column(name = "email")
	private String email;
	
	@Column(name = "type")
	private String type;
	

	@OneToMany(mappedBy = "login")
	private Set<Student> studentDetails;


	public Set<Student> getStudentDetails() {
		return studentDetails;
	}

	public void setStudentDetails(Set<Student> studentDetails) {
		this.studentDetails = studentDetails;
	}
	
	@OneToMany(mappedBy = "teacher")
	private Set<Course> courseDetails;

	public Set<Course> getCourseDetails() {
		return courseDetails;
	}

	public void setCourseDetails(Set<Course> courseDetails) {
		this.courseDetails = courseDetails;
	}
	
	@OneToMany(mappedBy = "student")
	private Set<Enrol> enrolDetails;

	public Set<Enrol> getEnrolDetails() {
		return enrolDetails;
	}

	public void setEnrolDetails(Set<Enrol> enrolDetails) {
		this.enrolDetails = enrolDetails;
	}
    
	@OneToMany(mappedBy = "student")
	private Set<Marks> marksDetails;
	
	public Set<Marks> getMarksDetails() {
		return marksDetails;
	}

	public void setMarksDetails(Set<Marks> marksDetails) {
		this.marksDetails = marksDetails;
	}

	public long getLoginId() {
		return loginId;
	}

	public void setLoginId(long loginId) {
		this.loginId = loginId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
}
